package com.simple.datax.flow.convertor;

import com.simple.datax.flow.message.BaseEcMessage;
import com.simple.datax.flow.message.EcFlowMessageBody;

public interface Convertor {
//	/**
//	 * 转换为EC报文流程对象
//	 * @param xml
//	 * @param encoding
//	 * @return
//	 * @throws Exception
//	 */
//	public int convert2EcFlow(byte[] xml, String encoding,EcFlowMessageBody messageBody) throws Exception;

	/**
	 * 报文对象转换为字节数组
	 * @param obj
	 * @return
	 * @throws Exception
	 */
	public byte[] convert2Xml(Object obj) throws Exception;

	/**
	 * 报文对象转换为字符串
	 * @param obj
	 * @return
	 * @throws Exception
	 */
	public String convert2StringXml(Object obj);
	
	/**
	 *字符串转换为EC报文
	 * @param xml
	 * @return
	 * @throws Exception
	 */
	public BaseEcMessage convert2EcMessage(String xml);
	
	/**
	 * 校验流程报文
	 * @param xml
	 * @return
	 */
	public int xsdValidate(String xml);

}
